package com.seven.good.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ApiModel("商品实体类")
public class Good implements Serializable {
    private Integer gid;

    @ApiModelProperty("商品标题名称")
    private String title;

    private String url;

    private Integer publisher;

    private BigDecimal dealPrice;

    private BigDecimal startPrice;

    private BigDecimal nowPrice;

    public BigDecimal getNowPrice() {
        return nowPrice;
    }

    public void setNowPrice(BigDecimal nowPrice) {
        this.nowPrice = nowPrice;
    }

    private Integer rangePrice;

    private Integer reservePrice;

    private Integer buyerBond;

    private Integer sellerBond;

    private Integer delayPeriod;

    private Integer goodType;

    private Integer goodState;

    private Integer bidNo;

    private Integer signupNo;

    private Integer remindNo;

    private Integer passedNo;

    private Integer circuseeNo;

    private Date startTime;

    private Date endTime;

    private Date updateTime;

    private Long durationSeconds;

    private Byte flag;

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getPublisher() {
        return publisher;
    }

    public void setPublisher(Integer publisher) {
        this.publisher = publisher;
    }

    public BigDecimal getDealPrice() {
        return dealPrice;
    }

    public void setDealPrice(BigDecimal dealPrice) {
        this.dealPrice = dealPrice;
    }

    public BigDecimal getStartPrice() {
        return startPrice;
    }

    public void setStartPrice(BigDecimal startPrice) {
        this.startPrice = startPrice;
    }

    public Integer getRangePrice() {
        return rangePrice;
    }

    public void setRangePrice(Integer rangePrice) {
        this.rangePrice = rangePrice;
    }

    public Integer getReservePrice() {
        return reservePrice;
    }

    public void setReservePrice(Integer reservePrice) {
        this.reservePrice = reservePrice;
    }

    public Integer getBuyerBond() {
        return buyerBond;
    }

    public void setBuyerBond(Integer buyerBond) {
        this.buyerBond = buyerBond;
    }

    public Integer getSellerBond() {
        return sellerBond;
    }

    public void setSellerBond(Integer sellerBond) {
        this.sellerBond = sellerBond;
    }

    public Integer getDelayPeriod() {
        return delayPeriod;
    }

    public void setDelayPeriod(Integer delayPeriod) {
        this.delayPeriod = delayPeriod;
    }

    public Integer getGoodType() {
        return goodType;
    }

    public void setGoodType(Integer goodType) {
        this.goodType = goodType;
    }

    public Integer getGoodState() {
        return goodState;
    }

    public void setGoodState(Integer goodState) {
        this.goodState = goodState;
    }

    public Integer getBidNo() {
        return bidNo;
    }

    public void setBidNo(Integer bidNo) {
        this.bidNo = bidNo;
    }

    public Integer getSignupNo() {
        return signupNo;
    }

    public void setSignupNo(Integer signupNo) {
        this.signupNo = signupNo;
    }

    public Integer getRemindNo() {
        return remindNo;
    }

    public void setRemindNo(Integer remindNo) {
        this.remindNo = remindNo;
    }

    public Integer getPassedNo() {
        return passedNo;
    }

    public void setPassedNo(Integer passedNo) {
        this.passedNo = passedNo;
    }

    public Integer getCircuseeNo() {
        return circuseeNo;
    }

    public void setCircuseeNo(Integer circuseeNo) {
        this.circuseeNo = circuseeNo;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Byte getFlag() {
        return flag;
    }

    public void setFlag(Byte flag) {
        this.flag = flag;
    }

    public Long getDurationSeconds() {
        if (endTime == null) {
            return null;
        }
        return (endTime.getTime()-new Date().getTime())/1000;
    }

    public void setDurationSeconds(Long durationSeconds) {
        this.durationSeconds = durationSeconds;
    }

    @Override
    public String toString() {
        return "Good{" +
                "gid=" + gid +
                ", title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", publisher=" + publisher +
                ", dealPrice=" + dealPrice +
                ", startPrice=" + startPrice +
                ", nowPrice=" + nowPrice +
                ", rangePrice=" + rangePrice +
                ", reservePrice=" + reservePrice +
                ", buyerBond=" + buyerBond +
                ", sellerBond=" + sellerBond +
                ", delayPeriod=" + delayPeriod +
                ", goodType=" + goodType +
                ", goodState=" + goodState +
                ", bidNo=" + bidNo +
                ", signupNo=" + signupNo +
                ", remindNo=" + remindNo +
                ", passedNo=" + passedNo +
                ", circuseeNo=" + circuseeNo +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", updateTime=" + updateTime +
                ", durationSeconds=" + durationSeconds +
                ", flag=" + flag +
                '}';
    }
}